// Themes module
use iced::Theme;

/// Available themes
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AppTheme {
    Light,
    Dark,
    TokyoNight,
    Dracula,
}

impl AppTheme {
    /// Convert to Iced theme
    pub fn to_iced_theme(self) -> Theme {
        match self {
            AppTheme::Light => Theme::Light,
            AppTheme::Dark => Theme::Dark,
            AppTheme::TokyoNight => Theme::TokyoNight,
            AppTheme::Dracula => Theme::Dracula,
        }
    }
    
    /// Get all available themes
    pub fn all() -> &'static [AppTheme] {
        &[
            AppTheme::Light,
            AppTheme::Dark,
            AppTheme::TokyoNight,
            AppTheme::Dracula,
        ]
    }
    
    /// Get theme name
    pub fn name(self) -> &'static str {
        match self {
            AppTheme::Light => "Light",
            AppTheme::Dark => "Dark",
            AppTheme::TokyoNight => "Tokyo Night",
            AppTheme::Dracula => "Dracula",
        }
    }
}

impl Default for AppTheme {
    fn default() -> Self {
        AppTheme::Dark
    }
}
